/**
 * Created by Administrator on 2017/7/23.
 */
/**
 * Created by Administrator on 2017/7/21.
 */

import Vue from 'vue';  //引入vue
import App from  './App.vue' //引入App.vue
//把App渲染进index.html

import VueRouter from 'vue-router' //引入路由
Vue.use(VueRouter) //全局使用路由
//引入自定义组件
import home from './component/home/home.vue'
import goods from './component/goods/goods.vue'
import shoppingcar from './component/shoppingcar/shoppingcar.vue'
import setting from './component/setting/setting.vue'

let router=new VueRouter({
    routes:[
        {path:'/',component:home},
        {path:'/goods',component:goods},
        {path:'/shoppingcar',component:shoppingcar},
        {path:'/setting',component:setting},

    ]
})

new Vue({
    el:"#view",
    router:router,
    render:function (created) {
        return created(App)
    }
})


